<template>
	<view>
		<div class="page">
		<div class="box1">
			<u-line color="blue" />
			<div class="input">
				<input v-model="text" ></input>
			</div>
			<div class="button">
				<u-button size="mini" type="success" @click="send">发送</u-button>
			</div>
		</div>
		
		</div>
	</view>
</template>

<script>
	export default {
		data() {
					return {
						form:{
							text:"",
							userID:this.$store.state.user.info._id,
							username:this.$store.state.user.info.username,
							
						}
					}
				},
				
		methods: {
			send(){
				const db = uniCloud.database() //代码块为cdb
				// 使用uni-clientDB
				db.collection('opendb-msg').add()
			}
		}
	}
</script>

<style lang="scss" scope>

.box1{
	background-color: #3B4144;
	bottom: var(--window-bottom,0);
	position:fixed; 
	height:50px;
	width:750rpx;
	display: flex;
	justify-content: space-around;
}
.input{
	width:300px;
	height:25px;
	border:1px solid ;
	
	// color:white;
	margin:10px;
	// z-index: 0
	background-color: white;
	
}
.button{
	margin:5px;
}
</style>
